package com.aipartner.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 支付响应DTO
 * 
 * @author AI伙伴团队
 * @since 2024-01-20
 */
@Data
@ApiModel(description = "支付响应")
public class PaymentResponse {
    
    @ApiModelProperty(value = "订单号", example = "ORDER_20240120_001")
    private String orderNo;
    
    @ApiModelProperty(value = "支付金额", example = "130.00")
    private BigDecimal amount;
    
    @ApiModelProperty(value = "支付方式", example = "wechat")
    private String paymentMethod;
    
    @ApiModelProperty(value = "支付状态：pending-待支付，paid-已支付", example = "pending")
    private String status;
    
    @ApiModelProperty(value = "支付链接或二维码", example = "weixin://wxpay/bizpayurl?pr=xxx")
    private String paymentUrl;
    
    @ApiModelProperty(value = "支付参数（JSON格式）", example = "{\"appId\":\"wx123\",\"timeStamp\":\"1642665600\"}")
    private String paymentParams;
    
    @ApiModelProperty(value = "订单过期时间（分钟）", example = "15")
    private Integer expireMinutes;
    
    @ApiModelProperty(value = "提示信息", example = "请在15分钟内完成支付")
    private String message;
    
    public PaymentResponse(String orderNo, BigDecimal amount, String paymentMethod) {
        this.orderNo = orderNo;
        this.amount = amount;
        this.paymentMethod = paymentMethod;
        this.status = "pending";
        this.expireMinutes = 15;
    }
}
